package com.lkqm.seckill.dao;

import com.lkqm.seckill.entity.SuccessKilled;
import org.apache.ibatis.annotations.Param;

/**
 * 秒杀明细DAO
 * Created by luokaiqiongmou on 2016/11/27.
 */
public interface SuccessKilledDao {

    /**
     * 插入成功的秒杀，可过滤重复
     * @param seckillId
     * @param userPhone
     * @return
     */
    int insertSuccessKilled(@Param("seckillId") long seckillId, @Param("userPhone") long userPhone);

    /**
     * 查询成功的秒杀，依据id,并携带秒杀产品的实体
     * @param seckillId
     * @return
     */
    SuccessKilled queryByIdWithSeckill(@Param("seckillId") long seckillId, @Param("userPhone") long userPhone);
}
